<template>
	<view>
		<view class="detail bg-white">
			<view class="detail-head">
				<view class="title  padding-sm">
					<text class="text-black text-blod text-xxl">{{detail.judge?detail.name:'该时间段无课'}}</text>
				</view>
				<view class="edit text-center padding-sm">
					<button class="cu-btn round lines-blue" role="button"
						@click="goEdit">{{detail.judge?'编辑':'添加'}}</button>
				</view>
			</view>
			<view class="detail-wrap" v-if="detail.judge">
				<view class="detail-list padding-sm">
					<text class="cuIcon-location lg text-cyan"></text>
					<text class="margin-left-sm margin-right-lg text-lg">教室</text>
					<text class="text-lg">{{detail.classroom}}</text>
				</view>
				<view class="detail-list padding-sm">
					<text class="cuIcon-form lg text-blue"></text>
					<text class="margin-left-sm margin-right-lg text-lg">节数</text>
					<text class="text-lg">{{detail.detail}}</text>
				</view>
				<view class="detail-list padding-sm">
					<text class="cuIcon-people lg text-green"></text>
					<text class="margin-left-sm margin-right-lg text-lg">教师</text>
					<text class="text-lg">{{detail.teacher}}</text>
				</view>
			</view>
		</view>
		<view class="padding flex flex-direction">
			<button class="cu-btn bg-blue lg">无课统计</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail: {}
			};
		},
		methods: {
			goEdit() {
				uni.navigateTo({
					url: '/subpkg/editCourse/editCourse'
				});
			}
		},
		onLoad() {
			this.detail = this.$store.state.w_timeTable.detailMessage[0]
			console.log(this.detail);
			// console.log();
		},
		computed: {}
	}
</script>

<style lang="scss" scoped>
	.detail {
		margin: 0 auto;

		.detail-head {
			padding: 40rpx 0;
			margin: 0 auto;
			display: grid;
			// width: 100%;
			grid-template-columns: 80% 20%;
			justify-content: space-between;
		}

		.detail-list {
			margin: 0 0 20rpx 0;
		}
	}
</style>
